#ifndef LASERCALCULATE_H
#define LASERCALCULATE_H

#include "globalDefine.h"

class LaserCalculate
{
public:
    LaserCalculate();

public:
    int setLaserIntensityFilter(double minumIntensityIn);
    int laserFilterByIntensity(const LaserDataInfo &frontLaserDataIn,
                           LaserDataInfo &frontLaserDataOut);
    int laserFilterByIntensity(double minumIntensityIn,const LaserDataInfo &frontLaserDataIn,
                           LaserDataInfo &frontLaserDataOut);
    /**
     * @brief findReflectiveStripe
     * @param minumIntensity
     * @param minStripeWidth
     * @param maxStripeWidth
     * @param frontLaserDataIn
     * @param posX, 相对反光条左角点，　unit is m
     * @param posY, 相对反光条左角点，　unit is m
     * @param posRotate, 相对反光条左角点，　unit is rad
     * @return
     */
    int findReflectiveStripe(double minumIntensity,double minStripeWidth,double maxStripeWidth,
                             const LaserDataInfo &frontLaserDataIn,
                             std::vector<double> &posX,std::vector<double> &posY,
                             std::vector<double> &posRotate);

private:
    int tranformToCartesianPosition(const LaserDataInfo &laserData,std::vector<double> &posX,
                                    std::vector<double> &posY);

private:
    double minumIntensity;
};

#endif // LASERCALCULATE_H
